package com.ruoyi.behindContract.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.behindContract.mapper.DocContractQBMapper;
import com.ruoyi.behindContract.domain.DocContractQB;
import com.ruoyi.behindContract.service.IDocContractQBService;

/**
 * 签约记录表Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-08-14
 */
@Service
public class DocContractQBServiceImpl implements IDocContractQBService
{
    @Autowired
    private DocContractQBMapper docContractMapper;

    /**
     * 查询签约记录表
     * 
     * @param contractId 签约记录表主键
     * @return 签约记录表
     */
    @Override
    public DocContractQB selectDocContractByContractId(Long contractId)
    {
        return docContractMapper.selectDocContractByContractId(contractId);
    }

    /**
     * 查询签约记录表列表
     * 
     * @param docContract 签约记录表
     * @return 签约记录表
     */
    @Override
    public List<DocContractQB> selectDocContractList(DocContractQB docContract)
    {
        return docContractMapper.selectDocContractList(docContract);
    }

    /**
     * 新增签约记录表
     * 
     * @param docContract 签约记录表
     * @return 结果
     */
    @Override
    public int insertDocContract(DocContractQB docContract)
    {
        return docContractMapper.insertDocContract(docContract);
    }

    /**
     * 修改签约记录表
     * 
     * @param docContract 签约记录表
     * @return 结果
     */
    @Override
    public int updateDocContract(DocContractQB docContract)
    {
        return docContractMapper.updateDocContract(docContract);
    }

    /**
     * 批量删除签约记录表
     * 
     * @param contractIds 需要删除的签约记录表主键
     * @return 结果
     */
    @Override
    public int deleteDocContractByContractIds(Long[] contractIds)
    {
        return docContractMapper.deleteDocContractByContractIds(contractIds);
    }

    /**
     * 删除签约记录表信息
     * 
     * @param contractId 签约记录表主键
     * @return 结果
     */
    @Override
    public int deleteDocContractByContractId(Long contractId)
    {
        return docContractMapper.deleteDocContractByContractId(contractId);
    }


    /**
     * 获取用户签约的团队ID
     */
    @Override
    public Long getUserTeamId(Long userId) {
        return docContractMapper.selectTeamIdByUserId(userId);
    }


}
